﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZR.Model.Models.ProductionControl
{
    [Table(Name = "cks_virtual_table")]
    [SugarTable("cks_virtual_table")]
    public class CksVirtualTable : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Column(IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        
        public string TableName { get; set; }

        public int Sequence {  get; set; }
        public long MaxSeqId {  get; set; }

        public string Notes { get; set; } = string.Empty;
        public DateTime CreatedTime { get; set; } = DateTime.Now;
    }

    [SugarTable("cks_virtual_column")]
    [Table(Name = "cks_virtual_column")]
    public class CksVirtualColumn : BaseEntity
    {
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        [Column(IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        public int TableId { get; set; }

        public string ColumnName { get; set; } = string.Empty;

        public string Notes { get; set; } = string.Empty;

        public int Sequence { get; set; } = 99;

        public int DataId { get; set; }
        public string ColumnKey { get; set; } = string.Empty;
        /// <summary>
        /// 是否主码
        /// </summary>
        public bool IsPrimary { get; set; }
        /// <summary>
        /// 是否结果
        /// </summary>
        public bool IsResult { get; set; }
        /// <summary>
        /// 是否是循环时间
        /// </summary>
        public bool IsCycleTime { get; set; }
        
        /// <summary>
        /// 是否是批次码
        /// </summary>
        public bool IsBatchCode { get; set; }

        /// <summary>
        /// 客户端是否展示
        /// </summary>
        public bool IsDisplay { get; set; }

        public int Width {  get; set; }

        public string LanguageKey { get; set; } = string.Empty;

        public DateTime CreatedTime { get; set; } = DateTime.Now;
    }

}
